<?php

namespace App\Models;

use App\Helpers\BaseModel;
use App\Helpers\RequestCriteria;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User as Authenticatable;

class OpenAPI extends Authenticatable
{
    use  HasFactory, RequestCriteria, BaseModel;

    protected $fillable = [
        'user_id' ,
        'api_token',
        'valid',
    ];

    protected $casts = [
        'updated_at' => 'datetime:Y-m-d H:i:s',
        'created_at' => 'datetime:Y-m-d H:i:s',
    ];

    protected $table = 'open_apis';

    public function user()
    {
        return $this->belongsTo(User::class);
    }
    
}
